const path = require('path');
const { exec } = require('pkg');
const OUTPUT_PATH = path.join(__dirname, '../output');
const RELEASE_PATH = path.join(OUTPUT_PATH, 'release');

(async function build() {
	await exec([
		'--target', ['node16-win'].join(','),
		'--output', path.join(RELEASE_PATH, 'mirror'),
		'--compress', 'GZip',
		path.resolve('dist/es5/index.js'),
	]);
})();